package com.alibaba.controller.htmlController;

import com.alibaba.bean.FollowNum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/backstage")
public class BackstageHandler {
    @Autowired
    ManagerUserController managerUserController;
    @Autowired
    NoticeController noticeController;
    @Autowired
    DailyListController dailyListController;

    @GetMapping("managerUser")
    public ModelAndView managerUser() {
        return managerUserController.managerUser();
    }

    @GetMapping("notice")
    public ModelAndView notice() {
        return noticeController.notice();
    }

//    @PostMapping(value = "deleteUser")
    @RequestMapping(value = "deleteUser", method = RequestMethod.POST)
    public String deleteUser(@RequestParam("userId") int userId) {
        System.out.printf(userId + "\n\n\n\n\n\nabababababababababa\n\n\n\n\n");
        return "1231232132132";
    }

    @GetMapping("dailyList")
    public ModelAndView dailyList() {
        return dailyListController.noteList();
    }
}
